//
//  BankCardAddCell.m
//  JinFuThree
//
//  Created by 毛韶谦 on 2018/9/6.
//  Copyright © 2018年 毛韶谦. All rights reserved.
//

#import "BankCardAddCell.h"

@implementation BankCardAddCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.contentView.backgroundColor = ListMaoBackgroundColor;
        UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
        [self.contentView addSubview:btn];
        [btn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.top.mas_equalTo(self.contentView);
            make.height.mas_equalTo(20);
        }];
        
        UIView *whiteView = [[UIView alloc] init];
        whiteView.backgroundColor = [UIColor whiteColor];
        whiteView.layer.cornerRadius = 4;
        whiteView.layer.masksToBounds = YES;
        [self.contentView addSubview:whiteView];
        [whiteView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.contentView.mas_left).offset(18);
            make.right.mas_equalTo(self.contentView.mas_right).offset(-18);
            make.bottom.mas_equalTo(self.contentView.mas_bottom);
            make.height.mas_equalTo(50);
        }];
        
        UILabel *addLabel = [[UILabel alloc] init];
        addLabel.text = @"添加银行卡";
        [addLabel setTextAlignment:NSTextAlignmentRight];
        addLabel.textColor = HexColor(0x333333);
        addLabel.font = [UIFont systemFontOfSize:15];
        [whiteView addSubview:addLabel];
        [addLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(107, 50));
            make.centerX.centerY.mas_equalTo(whiteView);
        }];
        UIImageView *addImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"ic_add"]];
        [addLabel addSubview:addImageView];
        [addImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.left.mas_equalTo(addLabel);
            make.size.mas_equalTo(CGSizeMake(20, 20));
        }];
        
    }
    return self;
}





- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
